package gcb.metalsys.enums;

import lombok.Getter;
import gcb.metalsys.base.ResultUtil;
import gcb.metalsys.base.dto.ResultDTO;

/**
 * @author ReMidDream
 * @date 2018/10/23 20:55
 **/
@Getter
public enum OrderEnum {

    FAIL(0,"失败"),
    START(1,"领入"),
    SETTLED(2,"交出"),
    CONTRACT(3,"拟定合同"),
    PAYING(4,"付款中"),
    SUCCESS(5,"订单完成"),
    ;

    private Integer code;

    private String message;

    OrderEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResultDTO show() {
        return ResultUtil.Error(this.code.toString(),this.message);
    }
}
